package DataStr.ex01;

import java.sql.SQLOutput;
import java.util.Scanner;

public class ex02 {
    public static void main(String[]args)  {
        int[]L={4,2,1,5,3,6,4};
        int j=0;//新指针
        int curLen=L.length;//顺序表长度
        int x=3;
        int y=5;
        System.out.print("删除后的顺序表为"+"[");
            for(int i=0;i<curLen;i++){
                if (L[i]<x||L[i]>y){//若不在范围内
                    L[j]=L[i];
                    System.out.print(L[j]);
                    if(i<curLen-2){
                        System.out.print(",");
                    }
                    j++;
                }
                }

        System.out.println("]");
    }
}
